package com.easybuilder.core.rbac.dao;

import com.easybuilder.common.base.dao.BaseDao;
import com.easybuilder.core.rbac.entity.SysUser;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.ExampleMapper;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public interface SysUserDao extends BaseDao<SysUser>, ExampleMapper<SysUser> {

    /** 统计用户数量 */
    @Select("select count(1) from sys_user union all select count(1) from sys_user where create_time like '${date}%'")
    List<Integer> countUser(@Param("date") String date);
}